﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>新闻列表</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" href="../assets/css/bootstrap.min.css" />
    <link rel="stylesheet" href="../assets/css/font-awesome.min.css" />
    <link rel="stylesheet" href="../assets/css/ace.min.css" />
</head>
<body ng-app="viewApp" class="page-content">
    <div ng-controller="viewController">
        <div class="btn-toolbar">

            <button class="btn btn-sm btn-primary" onclick="cppei.switchView('创建文章','cms/article-create.html')">
                <i class="icon-edit"></i>添加
            </button>

            <button class="btn btn-danger btn-sm" id="delete" ng-click="onDelete('all')">
                <i class="icon-trash"></i>删除
            </button>

        </div>
        <p></p>
        <div class="table-responsive">
            <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                <tr>
                    <th class="center">
                        <label>
                            <input type="checkbox" ng-model="allChk" class="ace" ng-click="allCheck(allChk)" />
                            <span class="lbl"></span>
                        </label>
                    </th>
                    <td>Id</td>
                    <td>Title</td>
                    <td>CreatedTime</td>
                    <td>修改时间</td>
                    <td>PublsihedTime</td>
                    <td>PublsihedUrl</td>
                    <td>显示的发布时间</td>
                    <td>操作</td>
                </tr>
                <tr ng-repeat="item in items">
                    <td class="center">
                        <label>
                            <input type="checkbox" ng-model="item.isChecked" class="ace" />
                            <span class="lbl"></span>
                        </label>
                    </td>
                    <td>{{item.id}}</td>
                    <td>{{item.title}}</td>
                    <td>{{item.createdTime}}</td>
                    <td>{{item.modifiedTime}}</td>
                    <td>{{item.publishedTime}}</td>
                    <td>{{item.publishedUrl}}</td>
                    <td>{{item.displayPublishedTime}}</td>
                    <td>
                        <div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
                            <button class="btn btn-xs btn-danger" ng-click="onDelete(item.id)">
                                <i class="icon-trash bigger-120"></i>
                            </button>

                            <button class="btn btn-xs btn-warning" ng-style="{display:true2Block(item.isEnabled)}" ng-click="disable(item.id)">
                                <i class="icon-lock bigger-120"></i>
                            </button>

                            <button class="btn btn-xs btn-success" ng-style="{display:true2Block(!item.isEnabled)}" ng-click="enable(item.id)">
                                <i class="icon-unlock bigger-120"></i>
                            </button>
                            <button class="btn btn-xs btn-success" ng-style="{display:true2Block(item.isEnabled)}" ng-click="publish(item.id)">
                                <i class="icon-share bigger-120"></i>
                            </button>
                        </div>
                    </td>
                </tr>
            </table>

            <pages></pages>

        </div>

        <script src="../assets/js/jquery-2.0.3.min.js"></script>
        <script src="../assets/js/bootstrap.min.js"></script>
        <script src="../assets/js/Promise.js"></script>
        <script src="../assets/js/typeahead-bs2.min.js"></script>
        <script src="../assets/js/ace-elements.min.js"></script>
        <script src="../assets/js/ace.min.js"></script>
        <script src="../assets/js/bootbox.min.js"></script>
        <script src="../assets/js/angular-1.4.1.min.js"></script>
        <script src="../assets/js/cppei/cppei.view.js"></script>
        <script src="../assets/js/cppei/cppei.paginationPlugin.js"></script>
        <script src="../assets/js/cppei/cppei.validate.js"></script>
        <script src="article-list.js"></script>
        <script>
            cppei.run(view);
        </script>
    </div>
</body>
</html>
